/*
 * Member.h
 *
 *  Created on: Mar 23, 2010
 *      Author: mike
 */

//**************************************************************************
// File Name: Member.h
// Definition of Member class - a class that sets/modifies the member data.
// Can also return data and tracks how much the member spent on
// purchase(es).
//
// Definition of SuperMember class - a class that has the same properties as
// Member class contains with additional properties (rebates).
// "Group 3"
// CS 1C
// March 25, 2010
// Group Project: SuperWarehouse
// Due: March 25, 2010
// - KZ's comment
//**************************************************************************

#ifndef MEMBER_H_
#define MEMBER_H_

#include <string>
#include <time.h>

using namespace std;

class Member {
public:
	Member();
	Member(string name, int num, time_t exp, char type);
	virtual ~Member();

	void setMemberData(string name, int num, char type, time_t exp);
	void setName(string name);
	void setMemberNumber(int memberID);
	void setMemberType(char memberLevel);
	void setDues(float dues);
	void setExpirationDate(time_t exp);
	void setTotalSpent(float spent);
	virtual void addPurchase(float purchase);
	string getName();
	int getMemberNumber();
	char getMemberType();
	float getDues();
	time_t getExpirationDate();
	float getTotalSpent();
	virtual string toString();

	virtual bool operator==(const Member &other) const;
	virtual Member &operator=(const Member &rhs);

protected:
	string memberName;
	int memberNumber;
	time_t expirationDate;
	char memberType;
	float annualDues;
	float totalSpent;
};

class SuperMember : public Member {
public:
	SuperMember();
	SuperMember(string name, int ID, time_t exp, char type, float rebate);
	~SuperMember();
	virtual void addPurchase(float purchase);
	void addRebate(float rebate);
	float getRebate();
	virtual string toString();
	virtual bool operator==(const SuperMember &other) const;
	virtual SuperMember &operator=(const SuperMember &rhs);
protected:
	float totalRebate;
};

#endif /* MEMBER_H_ */
